<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=CTNZCnWI1faDmbyMNmxkdAugZRTaU3WQ"></script>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="{$row.username|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-password" data-rule="password" class="form-control" name="row[password]" type="text" value="" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" />
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">商户联系人:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_name" data-rule="required"  class="form-control" name="row[brand_name]" type="text" value="{$row.brand_name|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brand_code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand_code" class="form-control" name="row[brand_code]" type="text" value="{$row.brand_code|htmlentities}">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parent')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pid"  data-field="username" data-source="user/user/index" class="form-control selectpage" data-params='{"custom[status]":"1"}' name="row[pid]" type="text" value="{$row.pid|htmlentities}">
        </div>
    </div> -->
    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-mobile" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('省市区')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                <select class="province form-control" name="row[province_id]" data-url="ajax/area">
                    <option value="{$row.province_id|htmlentities}"></option>
                </select>
                <select class="city form-control" name="row[city_id]" data-query-name="province" data-url="ajax/area">
                    <option value="{$row.city_id|htmlentities}"></option>
                </select>
                <select class="area form-control" name="row[county_id]" data-query-name="city" data-url="ajax/area">
                    <option value="{$row.county_id|htmlentities}"></option>
                </select>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="c-sort" class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-sort" data-rule="required" class="form-control" name="row[sort]" type="text" value="{$row.sort}">
        </div>
    </div>


    <div class="form-group">
        <label for="c-jointime" class="control-label col-xs-12 col-sm-2">{:__('Jointime')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-jointime"  class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[jointime]" type="text" value="{$row.jointime|datetime}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['1'=>__('Normal'), '0'=>__('Hidden')], $row['status'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <input type="hidden" name="row[id]" value="{$row.id|htmlentities}">
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <!-- <div class="form-group">
        
        <label class="control-label col-xs-12 col-sm-2">经纬度:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lonlat" data-rule="required" class="form-control" name="row[lonlat]" type="text" value="{$row.lonlat|htmlentities}">
        </div>
    </div> -->
    <!-- <div id="maps">
        <div id="l-map"></div>
        <div id="r-result">请输入:<input type="text" id="suggestId" size="20" value="" style="width:300px;" /></div>
    </div> -->
    <div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<style>
    .col-sm{
        width: 0%;
        top: 4px;
    }
    #l-map{height:450px;width:100%;}
    #r-result{width:100%; position: absolute; top: 10px; left: 10px}
    #maps{position: relative}
</style>